<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Django 文件上传</title>
</head>
<body>
<form action="{% url 'index' %}" method="post" enctype="multipart/form-data">
    <div>
        <input type="file" name="file" accept="image/jpeg,image/jpg,image/png">
    </div>
    <div>
        <button type="submit">上传文件</button>
    </div>
</form>
</body>
</html>